package cn.ddiancan.auth.service.token;

import java.util.Map;

import cn.ddiancan.auth.constant.RequestSourceEnum;
import lombok.Getter;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.core.AuthorizationGrantType;
import org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken;

@Getter
public class XddAuth2GrantAuthenticationToken extends OAuth2AuthorizationGrantAuthenticationToken {

    protected RequestSourceEnum requestSource;

    protected String requestType;

    /**
     * Sub-class constructor.
     *
     * @param authorizationGrantType the authorization grant type
     * @param clientPrincipal        the authenticated client principal
     * @param additionalParameters   the additional parameters
     */
    protected XddAuth2GrantAuthenticationToken(AuthorizationGrantType authorizationGrantType,
        Authentication clientPrincipal, Map<String, Object> additionalParameters) {
        super(authorizationGrantType, clientPrincipal, additionalParameters);
    }
}
